﻿@model PracticeAzure.Website.Models.PagedViewModel

@using PracticeAzure.Website.Shared

<div class="page-index-bottom">
    <div class="pager" style="float: right;">
        @{
            var currentActionName=ViewContext.RouteData.Values["action"].ToString();
            var nextPageRouteData = new KeyValuePair<string, string>("page", (Model.Page + 1).ToString());
            var previousPageRouteData = new KeyValuePair<string, string>("page", (Model.Page - 1).ToString());
            }

        @if (Model.AllowPrevious)
        {
            <span>
            @Html.ActionLink("< 上一页", currentActionName, ViewContext.RouteData.Values.Clone(previousPageRouteData))
            </span>
        }
        else
        {
            <span style="color: #777;">< 上一页</span>
        }
        <span style="color: #777;"> | </span>
        @if (Model.AllowNext)
        {
            <span>
            @Html.ActionLink("下一页 >", currentActionName, ViewContext.RouteData.Values.Clone(nextPageRouteData))
            </span>
        }
        else
        {
            <span style="color: #777;">下一页 ></span>
        }
    </div>
    <div class="range">
        第<b>@Model.Start</b> - <b>@Model.End</b>条，共<b>@Model.Count</b>个 @Model.Name。
    </div>
</div>